package com.yuan.yblog.portal.pojo.DTO;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serial;
import java.io.Serializable;

/**
 * @author hepeiyuan on 2024/6/4 14:35
 * @description MYSQL数据库变化记录
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
public class MysqlMessage implements Serializable {

    @Serial
    private static final long serialVersionUID = -1L;

    /**
     * 数据主键
     */
    Long id;

    /**
     * 数据表名
     */
    String tableName;

    /**
     * 操作类型
     */
    OperationType operationType;

    public enum OperationType {
        INSERT,
        UPDATE,
        DELETE;
    }
}
